﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using DTO;
using BUS;

namespace GUI
{
    public partial class frmThemLoaiThietBi : DevComponents.DotNetBar.Metro.MetroForm
    {
        public delegate void ThemMoi(string TenLoaiThietBi);
        public event ThemMoi KhiThemMoi = null;

        public frmThemLoaiThietBi()
        {
            InitializeComponent();
        }

        private void btnDongY_Click(object sender, EventArgs e)
        {
            if (txtTenLoaiThietBi.Text != "")
            {
                if (KhiThemMoi != null)
                    KhiThemMoi(txtTenLoaiThietBi.Text);
            }
            else
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("Bạn chưa nhập tên loại thiết bị!", "eMobile - Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                txtTenLoaiThietBi.Focus();
            }
        }

        private void btnHuy_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}